﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;

namespace CodeContracts
{
    [ContractClass(typeof(Demo))]
    public interface IDemoInterface
    {
        bool IsString(string check);
    }

    [ContractClassFor(typeof(IDemoInterface))]
    abstract class Demo : IDemoInterface
    {
        public bool IsString(string check)
        {
            Contract.Requires(string.IsNullOrWhiteSpace(check) == false);

            // notice that I'm not setting a return value for this function
            throw new NotImplementedException();
        }
    }
}
